/**
 * Name: Element styling & vertical rhythm 
 * Purpose: Page structuring
 */

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    &:before,
    &:after {
        box-sizing: border-box;
    }
}

html, body { height: 100%; }

html {
    // Percentage allows rem values to equal pixel values i.e. 1.6rem = 16px
    font-size: 62.5%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    width: 100%;
    position: relative;
}

body {
    position: relative;
    line-height: $line-height-base;
    font-family: $font-family-base;
    font-size: $font-size-base;
    color: $brand-text;
    background-color: $brand-body-bg;
    background: linear-gradient(to left bottom,$brand-body-bg,darken($brand-body-bg, 5%));
    background-repeat: no-repeat;
    background-attachment: fixed;
    @include respond-max($bp-sm) { font-size: $font-size-sm; }
}

h1, h2, h3, h4, h5, h6,
.as-h1, .as-h2, .as-h3, .as-h4, .as-h5, .as-h6 {
    font-family: $headings-font-family;
    font-weight: $headings-font-weight;
    margin-top: 0;
    margin-bottom: $guttering/1.5;
    small,
    .small {
        font-weight: normal;
        line-height: 1;
    }
}

h1, .as-h1,
h2, .as-h2,
h3, .as-h3 {
    small,
    .small {
        font-size: 65%;
    }
}

h4, .as-h4,
h5, .as-h5,
h6, .as-h6 {
    small,
    .small { font-size: 75%; }
}

h1, .as-h1 {
    font-size: $font-size-h1;
    @include respond-max($bp-sm) { font-size: $font-size-h2; }
}

h2, .as-h2 {
    font-size: $font-size-h2;
    @include respond-max($bp-sm) { font-size: $font-size-h3; }
}

h3, .as-h3 {
    font-size: $font-size-h3;
    @include respond-max($bp-sm) { font-size: $font-size-h4; }
}

h4, .as-h4 {
    font-size: $font-size-h4;
    @include respond-max($bp-sm) { font-size: $font-size-h5; }
}

h5, .as-h5 {
    font-size: $font-size-h5;
    @include respond-max($bp-sm) { font-size: $font-size-h6; }
}

h6, .as-h6 {
    font-size: $font-size-h6;
    @include respond-max($bp-sm) { font-size: $font-size-h7; }
}

a {
    color: $brand-link-color;
    text-decoration: none;
    font-weight: 700;
    transition: color .25s;
    &:hover,
    &:focus {
        color: $brand-link-hover-color;
        cursor: pointer;
        text-decoration: underline;
        transition: color .25s;
    }
}

img {
    width: 100%;
    max-width: 100%;
}